package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.entity.user.PointType;
import com.qf.mapper.PointTypeMapper;
import com.qf.service.PointTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * --- 万物归集  不随你我 ---
 * <p>
 * 快捷短语
 * main ==  public static void main(String[] args);
 * sout ==  System.out.println();
 *
 * @author shuhan
 * @date 2025/6/11
 * @desc
 */
@Service
public class PointTypeServiceImpl implements PointTypeService {
    @Resource
    private PointTypeMapper pointTypeMapper;

    @Override
    public Integer findPointByPointType(Integer pointType) {
        // 根据积分类型查询积分
        PointType pointType1 = pointTypeMapper.selectOne(new QueryWrapper<PointType>()
                .eq("point_type", pointType));


        return pointType1.getPoint();

    }
}
